<!DOCTYPE html>
<html lang="en-US">
  <head>
    <meta charset="utf-8">
    <title>My test page</title>
  </head>
  <body>
    <p>This is my page</p>
    <span></span>
    <script>
      let promise = fetch('https://raw.githubusercontent.com/mdn/learning-area/master/javascript/asynchronous/promises/coffee.jpg')
      .then(response => response.blob())
      .then(blob => {
        let objectURL = URL.createObjectURL(blob);
        let image = document.createElement('img');
        image.src = objectURL;
        document.body.appendChild(image);
      })
      .catch(e => {
        console.log('error: ' + e.message);
      });
    </script>
  </body>
</html>
